<template>
  <div class="todoPage">
    <div class="header">
      <div class="title">
        <span class="txt">我的待办</span>
      </div>
    </div>
    <div class="content">
      <div class="todoList">
        <div class="todoItem" v-for="(item, index) in todoList" :key="index">
          <div class="item" @click="goDetail(item)">
            <!-- <img :src="item.imgUrl" alt="" /> -->
            <span :class="'bg' + index"></span>
            <span class="num">{{ item.num }}</span>
          </div>
          <p class="title" :title="item.title">{{ item.title }}</p>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      todoList: [
        {
          title: "一网统管",
          num: 586,
          link: "",
          imgUrl: require("../../imgs/bg.png"),
        },
        {
          title: "智慧应急",
          num: 106,
          link: "",
          imgUrl: require("../../imgs/bg.png"),
        },
        {
          title: "智慧消防",
          num: 82,
          link: "",
          imgUrl: require("../../imgs/bg.png"),
        },
      ],
    };
  },
  created() {},
  methods: {
    // 点击新闻
    goDetail(){
      alert('暂未开发')
    }
  },
};
</script>
<style lang="less" scoped>
.todoPage {
  width: 100%;
  height: 100%;
  .header {
    height: 50px;
    display: flex;
    align-items: center;
    position: relative;
    .title {
      font-weight: 600;
      font-size: 20px;
      line-height: 50px;
    }
  }
  .content {
    height: calc(100% - 50px);
    position: relative;
    display: flex;
    .todoList {
      width: 100%;
      display: flex;
      justify-content: space-around;
      align-items: center;
      .todoItem {
        width: 100px;
        cursor: pointer;
        .item {
          display: flex;

          img {
            width: 30px;
            height: 30px;
            margin-right: 10px;
          }
          .num {
            line-height: 30px;
            font-size: 20px;
            font-weight: 600;
          }
        }
        .title {
          font-size: 16px;
          text-align: right;
        }
      }
    }
  }
}
.bg0{
  width: 30px;
  height: 30px;
  margin-right: 10px;
  background-image: url('@/imgs/icon/ywtg.svg');
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.bg1{
  width: 30px;
  height: 30px;
  margin-right: 10px;
  background-image: url('@/imgs/icon/zhyj.svg');
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.bg2{
  width: 30px;
  height: 30px;
  margin-right: 10px;
  background-image: url('@/imgs/icon/zhxf.svg');
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
</style>